<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理后台 - {{ settings.site_title }}</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body class="admin-body">
    <div class="admin-layout">
        <nav class="admin-sidebar">
            <div class="sidebar-header">
                <h3>管理后台</h3>
            </div>
            <ul class="sidebar-menu">
                <li><a href="{{ url_for('admin_dashboard') }}" class="active">仪表板</a></li>
                <li><a href="{{ url_for('admin_posts') }}">文章管理</a></li>
                <li><a href="{{ url_for('admin_pages') }}">页面管理</a></li>
                <li><a href="{{ url_for('admin_settings') }}">网站设置</a></li>
                <li><a href="{{ url_for('admin_logout') }}">退出登录</a></li>
            </ul>
        </nav>

        <main class="admin-main">
            <header class="admin-header">
                <h1>仪表板</h1>
            </header>

            <div class="admin-content">
                <div class="dashboard-stats">
                    <div class="stat-card">
                        <h3>文章总数</h3>
                        <p class="stat-number">{{ posts|length }}</p>
                    </div>
                    <div class="stat-card">
                        <h3>页面总数</h3>
                        <p class="stat-number">{{ pages|length }}</p>
                    </div>
                </div>

                <div class="dashboard-actions">
                    <a href="{{ url_for('admin_post_editor') }}" class="btn btn-primary">新建文章</a>
                    <a href="{{ url_for('admin_page_editor') }}" class="btn btn-secondary">新建页面</a>
                </div>
            </div>
        </main>
    </div>
</body>
</html>
